package com.health.platform.provider.publichealth.controller;

import com.health.platform.common.core.entity.CommonQueryEntity;
import com.health.platform.common.restful.AppResponse;
import com.health.platform.provider.publichealth.service.PublicHealthProvinceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>公共卫生-省厅Controller</p>
 * <p>创建日期：2021-02-25</p>
 *
 * @author wangyanlei
 */
@RestController
@RequestMapping("/publicHealth")
public class PublicHealthProvinceController {

    @Autowired
    private PublicHealthProvinceService publicHealthProvinceService;

    /**
     * 获取数值类的信息
     *
     * @param commonQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getPersonTotal")
    public AppResponse getPersonTotal(@RequestBody CommonQueryEntity commonQueryEntity) {
        return publicHealthProvinceService.getPersonTotal(commonQueryEntity);
    }

    /**
     * 获取数值类的信息
     *
     * @param commonQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getEchartsGWByYear")
    public AppResponse getEchartsGWByYear(@RequestBody CommonQueryEntity commonQueryEntity) {
        return publicHealthProvinceService.getEchartsGWByYear(commonQueryEntity);
    }

    /**
     * 获取排名的信息
     *
     * @param commonQueryEntity 参数
     * @return 结果
     */
    @RequestMapping("/getSort")
    public AppResponse getSort(@RequestBody CommonQueryEntity commonQueryEntity) {
        return publicHealthProvinceService.getSort(commonQueryEntity);
    }
}
